home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / ditroff / RCS / tmac.sprite,v < prev    next >
Encoding:
Text File  |  1991-10-31  |  7.9 KB  |  482 lines

  1. head     1.13;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.13
  10. date     91.10.24.13.23.19;  author ouster;  state Exp;
  11. branches ;
  12. next     1.12;
  13.  
  14. 1.12
  15. date     91.07.10.09.02.57;  author ouster;  state Exp;
  16. branches ;
  17. next     1.11;
  18.  
  19. 1.11
  20. date     91.03.23.12.11.19;  author ouster;  state Exp;
  21. branches ;
  22. next     1.10;
  23.  
  24. 1.10
  25. date     89.06.08.17.10.07;  author ouster;  state Exp;
  26. branches ;
  27. next     1.9;
  28.  
  29. 1.9
  30. date     89.06.03.16.23.35;  author ouster;  state Exp;
  31. branches ;
  32. next     1.8;
  33.  
  34. 1.8
  35. date     89.05.15.15.29.01;  author ouster;  state Exp;
  36. branches ;
  37. next     1.7;
  38.  
  39. 1.7
  40. date     89.02.08.12.43.40;  author ouster;  state Exp;
  41. branches ;
  42. next     1.6;
  43.  
  44. 1.6
  45. date     88.12.30.13.48.11;  author ouster;  state Exp;
  46. branches ;
  47. next     1.5;
  48.  
  49. 1.5
  50. date     88.12.30.13.27.46;  author ouster;  state Exp;
  51. branches ;
  52. next     1.4;
  53.  
  54. 1.4
  55. date     88.12.29.12.09.03;  author ouster;  state Exp;
  56. branches ;
  57. next     1.3;
  58.  
  59. 1.3
  60. date     88.12.29.10.20.26;  author ouster;  state Exp;
  61. branches ;
  62. next     1.2;
  63.  
  64. 1.2
  65. date     88.12.21.08.37.07;  author ouster;  state Exp;
  66. branches ;
  67. next     1.1;
  68.  
  69. 1.1
  70. date     88.12.19.14.34.55;  author ouster;  state Exp;
  71. branches ;
  72. next     ;
  73.  
  74.  
  75. desc
  76. @Supplemental macros for Sprite man pages.
  77. @
  78.  
  79.  
  80. 1.13
  81. log
  82. @It is claimed that ".ad b" in .HS makes nroff output look better.
  83. @
  84. text
  85. @.\" This file contains extra Ditroff macros used in Sprite man pages:
  86. .\"
  87. .\" .HS name section [date [version]]
  88. .\"    Replacement for .TH in other man pages.  See below for valid
  89. .\"    section names.
  90. .\"
  91. .\" .LG
  92. .\"    Increase font size;  opposite of .SM
  93. .\"
  94. .\" .AP type name in/out [indent]
  95. .\"    Start paragraph describing an argument to a library procedure.
  96. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  97. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  98. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  99. .\"    needed;  use .AS below instead)
  100. .\"
  101. .\" .AS [type [name]]
  102. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  103. .\"    name are examples of largest possible arguments that will be passed
  104. .\"    to .AP later.  If args are omitted, default tab stops are used.
  105. .\"
  106. .\" .BS
  107. .\"    Start box enclosure.  From here until next .BE, everything will be
  108. .\"    enclosed in one large box.
  109. .\"
  110. .\" .BE
  111. .\"    End of box enclosure.
  112. .\"
  113. .\" .VS
  114. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  115. .\"    of man pages.
  116. .\"
  117. .\" .VE
  118. .\"    End of vertical sidebar.
  119. .\"
  120. '    # Heading for Sprite man pages
  121. .de HS
  122. .PD
  123. .DT
  124. .AS
  125. .if n .nr IN .5i
  126. .if t .nr IN .5i
  127. .nr LL \\n(.l
  128. .ds ]S UNKNOWN SECTION (\\$2)
  129. .if '\\$2'cmds'       .ds ]S User Commands
  130. .if '\\$2'lib'        .ds ]S C Library Procedures
  131. .if '\\$2'dev'        .ds ]S Devices
  132. .if '\\$2'tcl'        .ds ]S Tcl Command Language Library
  133. .if '\\$2'admin'      .ds ]S Administrative Commands
  134. .if '\\$2'daemons'    .ds ]S Daemons
  135. .if '\\$2'files'      .ds ]S File Formats
  136. .ds ]H \\$1
  137. .ds ]D \\*(]S
  138. .ie '\\$3'' .ds ]L  Printed:\\ \\ \\*(DY
  139. .el         .ds ]L  Modified:\\ \\ \\$3
  140. .if t .ie '\\$4'' .ds ]W Sprite version 1.0
  141. .if t .el         .ds ]W Sprite version \\$4
  142. .if n .ie '\\$4'' .ds ]W Sprite v.1.0
  143. .if n .el         .ds ]W Sprite v.\\$4
  144. .if !"\\$3"" .ds ]L \\$3
  145. .wh 0 }H
  146. .if t .wh -1i }B
  147. .if n .wh -1.167i }F
  148. .if \\n(nl .bp 1
  149. .em }M
  150. .}E
  151. .DT
  152. .nr )I .5i
  153. .nr )R 0
  154. .ad b
  155. ..
  156. '    # Increase point size 1 tick
  157. .de LG
  158. .ps +1
  159. .it 1 }N
  160. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  161. ..
  162. '    # Start an argument description
  163. .de AP
  164. .ie !"\\$4"" .TP \\$4
  165. .el \{\
  166. .   ie !"\\$2"" .TP \\n()Cu
  167. .   el          .TP 15
  168. .\}
  169. .ie !"\\$3"" \{\
  170. .ta \\n()Au \\n()Bu
  171. \&\\$1    \\fI\\$2\\fP    (\\$3)
  172. .\".b
  173. .\}
  174. .el \{\
  175. .br
  176. .ie !"\\$2"" \{\
  177. \&\\$1    \\fI\\$2\\fP
  178. .\}
  179. .el \{\
  180. \&\\fI\\$1\\fP
  181. .\}
  182. .\}
  183. .DT
  184. ..
  185. '    # define tabbing values for .AP
  186. .de AS
  187. .nr )A 10n
  188. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  189. .nr )B \\n()Au+15n
  190. .\"
  191. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  192. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  193. ..
  194. '    # BS - start boxed text
  195. .de BS
  196. .br
  197. .mk )a
  198. .ds )b 1
  199. .if n .nf
  200. .if n .ti 0
  201. .if n \l'\\n(.lu\(ul'
  202. .if n .fi
  203. ..
  204. '    # Special macro to handle page bottom:  finish off current
  205. '    # box/sidebar if in box/sidebar mode, then invoked standard
  206. '    # page bottom macro.
  207. .de }B
  208. .if '\\*()b'1' \{\
  209. .ev 1
  210. 'ti 0
  211. 'nf
  212. .if t \h'-1.5n'\L'|\\n()au-1.5v'\l'\\n(.lu+3n\(ul'\L'-|\\n()au+1.5v'\l'|0u-1.5n\(ul'
  213. 'sp -1
  214. .ev
  215. 'fi
  216. .\}
  217. .if '\\*()v'2' \{\
  218. .if t \{\
  219. .ev 1
  220. 'ti 0
  221. 'nf
  222. .br
  223. \h'\\n(.lu+3n'\v'-1v'\L'|\\n()bu-1v\(br'\v'-|\\n()bu+2v'\h'|0u'
  224. 'sp -1
  225. 'fi
  226. .ev
  227. .\}
  228. .\}
  229. .}F
  230. ..
  231. '    # What to do when the head of the page occurs during boxed text
  232. '    # or vertical sidebar: update starting position for box/sidebar.
  233. .am }H
  234. .mk )a
  235. .mk )b
  236. ..
  237. '    # BE - end boxed text (draw box now)
  238. .de BE
  239. .sp -1
  240. .nf
  241. .ti 0
  242. .ie n \l'\\n(.lu\(ul'
  243. .el \{
  244. \h'-1.5n'\L'|\\n()au-1.5v'\l'\\n(.lu+3n\(ul'\L'-|\\n()au+1.5v'\l'|0u-1.5n\(ul'
  245. .\"   \h = move left 1.5n
  246. .\"   \L = draw up,   len=  )a units + 1.5v 
  247. .\"    \L draws a line, arg = distance. if negative, draws up.
  248. .\"    The position in reg. )a is used to draw the vertical lines.
  249. .\"      |\\n)au = distance from current loc. to )a (negative distance)
  250. .\"      -1.5v   = distance above )a since there is text at )a's location
  251. .\"   \l = draw right, len= cur. line length + 3n using underrule
  252. .\"   \L = draw down, len=  )a units + 1.5v 
  253. .\"   \l = draw left, back to original spot
  254. .\}
  255. .fi
  256. .br
  257. .ds )b 0
  258. ..
  259. '    # VS - start vertical sidebar
  260. .de VS
  261. .mk )b
  262. .if n 'mc \s12\(br\s0
  263. .if t \{\
  264. .ds )v 2
  265. .\}
  266. ..
  267. '    # VE - end of vertical sidebar
  268. .de VE
  269. .if n 'mc
  270. .if t \{\
  271. .ev 1
  272. .nf
  273. .ti 0
  274. \h'|\\n(.lu+3n'\L'|\\n()bu-1v\(bv'\v'-|\\n()bu+1v'\h'-|\\n(.lu+3n'
  275. .sp -1
  276. .fi
  277. .ev
  278. .\}
  279. .ds )v 0
  280. ..
  281. .\"
  282. .\"  Define the string DY to be the current date
  283. .\"  format:  month day, year
  284. .\"
  285. .if \n(mo-0 .ds MO January
  286. .if \n(mo-1 .ds MO February
  287. .if \n(mo-2 .ds MO March
  288. .if \n(mo-3 .ds MO April
  289. .if \n(mo-4 .ds MO May
  290. .if \n(mo-5 .ds MO June
  291. .if \n(mo-6 .ds MO July
  292. .if \n(mo-7 .ds MO August
  293. .if \n(mo-8 .ds MO September
  294. .if \n(mo-9 .ds MO October
  295. .if \n(mo-10 .ds MO November
  296. .if \n(mo-11 .ds MO December
  297. .ds DY \*(MO \n(dy, 19\n(yr
  298. @
  299.  
  300.  
  301. 1.12
  302. log
  303. @Slight adjustments in vertical-bar stuff to fix problems with Tcl.man.
  304. @
  305. text
  306. @d70 1
  307. @
  308.  
  309.  
  310. 1.11
  311. log
  312. @Use bold vertical for VS-VE lines (doesn't seem to make much
  313. difference, though).
  314. @
  315. text
  316. @d137 2
  317. a138 1
  318. \h'|\\n(.lu+2n'\v'-1v'\L'|\\n()bu-1v\(br'\v'-|\\n()bu+2v'\h'-|\\n(.lu+2n'
  319. d176 1
  320. a178 1
  321. .mk )b
  322. d189 1
  323. a189 1
  324. \h'|\\n(.lu+2n'\L'|\\n()bu-1v\(bv'\v'-|\\n()bu+1v'\h'-|\\n(.lu+2n'
  325. @
  326.  
  327.  
  328. 1.10
  329. log
  330. @Permit simultaneous box and sidebar.
  331. @
  332. text
  333. @d188 1
  334. a188 1
  335. \h'|\\n(.lu+2n'\L'|\\n()bu-1v\(br'\v'-|\\n()bu+1v'\h'-|\\n(.lu+2n'
  336. @
  337.  
  338.  
  339. 1.9
  340. log
  341. @Bug in .VE for nroff.
  342. @
  343. text
  344. @d137 1
  345. a137 1
  346. \h'|\\n(.lu+2n'\v'-1v'\L'|\\n()au-1v\(br'\v'-|\\n()au+2v'\h'-|\\n(.lu+2n'
  347. d149 1
  348. d177 1
  349. a177 1
  350. .mk )a
  351. d188 1
  352. a188 1
  353. \h'|\\n(.lu+2n'\L'|\\n()au-1v\(br'\v'-|\\n()au+1v'\h'-|\\n(.lu+2n'
  354. @
  355.  
  356.  
  357. 1.8
  358. log
  359. @Fix VS/VE and BS/BE.
  360. @
  361. text
  362. @a181 1
  363. .ev 1
  364. d184 1
  365. d190 1
  366. a192 1
  367. .ev
  368. @
  369.  
  370.  
  371. 1.7
  372. log
  373. @Added "files" section type.
  374. @
  375. text
  376. @d62 1
  377. a62 2
  378. .if t .wh -1i }F
  379. .if t .wh -1.5i }B
  380. d119 3
  381. a121 2
  382. '    # Special macro to finish off current box if page bottom
  383. '    # is reached while in box mode.
  384. d123 2
  385. a124 1
  386. .if '\\*()b'1' \{
  387. d128 2
  388. a130 1
  389. 'bp
  390. d132 12
  391. d145 2
  392. a146 2
  393. '    # What to do when the head of the page occurs during boxed text:
  394. '    # update starting position for box.
  395. d174 5
  396. a178 1
  397. 'mc \s12\(br\s0
  398. d180 1
  399. a180 1
  400. '    # VE - end of vertical sidebar (delay until line is done)
  401. d182 11
  402. a192 4
  403. 'it 1 }V
  404. ..
  405. .de }V
  406. 'mc
  407. @
  408.  
  409.  
  410. 1.6
  411. log
  412. @Bug in last modiffication.
  413. @
  414. text
  415. @d51 1
  416. @
  417.  
  418.  
  419. 1.5
  420. log
  421. @Added code to finish off boxes at page bottom.
  422. @
  423. text
  424. @d128 1
  425. @
  426.  
  427.  
  428. 1.4
  429. log
  430. @Use shorter footing for nroff-ed man pages.
  431. @
  432. text
  433. @d62 1
  434. d113 1
  435. d119 15
  436. d139 2
  437. a140 1
  438. .ie t \{
  439. d148 1
  440. a148 1
  441. .\"   \l = draw left, len= cur. line length + 3n using underrule
  442. d150 1
  443. a150 1
  444. .\"   \l = draw right, back to original spot
  445. a151 1
  446. .el \l'\\n(.lu\(ul'
  447. d154 1
  448. @
  449.  
  450.  
  451. 1.3
  452. log
  453. @Added more names to the list of "understood" sections.
  454. @
  455. text
  456. @d55 4
  457. a58 2
  458. .ie '\\$4'' .ds ]W Sprite version 1.0
  459. .el         .ds ]W Sprite version \\$4
  460. @
  461.  
  462.  
  463. 1.2
  464. log
  465. @Bug fix in .BS: outdent if in nroff.
  466. @
  467. text
  468. @d46 1
  469. a46 1
  470. .if '\\$2'lib'        .ds ]S Library Procedures
  471. d49 2
  472. @
  473.  
  474.  
  475. 1.1
  476. log
  477. @Initial revision
  478. @
  479. text
  480. @d109 1
  481. @
  482.